<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>柱状图测试</title>



</head>
<body>
    <div id="report" style="width:100%">
    </div>

    <script language="javascript" type="text/javascript">
    //״ͼ
    function DradHistogram(TotalWihth)
    {
        var Html ="";
        var ParamNum = DradHistogram.arguments.length;
        var SimWidth = parseInt(TotalWihth / ParamNum );
        var Color = '#';
        var C = new Array(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F');
        
       document.getElementById("report").style.width = TotalWihth + ParamNum * 2;
        for (var i = 1 ; i < ParamNum; i++)
        {
            for(var j=0;j<6;j++)
            {
                Color = Color + C[parseInt(Math.random()*16)];
            }
            Html = Html + '<div style="width:'+SimWidth+'px; height:200px; margin-left:1px ; background-color:'+Color+'; float:left; margin-bottom:2px"><div style=" height:'+(200-DradHistogram.arguments[i])+'px;background-color:#FFFFFF"></div></div>'
            
            Color = '#';
        }
        document.getElementById("report").innerHTML = Html;
    }
    
    DradHistogram(760,20,30,40,40,50,30,10,20,35,25,20,30,40,40,50,30,10,20,35,25,25,20,30,40,40,50,30,10,20,35,25,30,40,40,50,30,10,20,35,25,35,25,20,30,40,40,50,30,10,20,35,25,25,20,30,40,40,50,30,50);
    </script>

</body>
</html>